package com.openrange.dukes.Input
{
	import com.openrange.dukes.Dukes.Duke;
	
	public class AiInput extends BaseInput
	{
		
		public function AiInput() 
		{
			
		}
		
		override public function getInput(unit:Duke):void
		{			
			//do some clever AI stuff :)
			
			//DUMB for the moment 
			var rand:Number = Math.random();
			if (rand < 0.25)
			{
				unit.move( -1, 0);
			}
			else if (rand < 0.5)
			{
				unit.move( 1, 0);
			}
			else if (rand < 0.75)
			{
				unit.move( 0, -1);
			}
			else
			{
				unit.move( 0, 1);
			}
		}
		
	}

}